﻿#ifndef BINARYRAINWIDGET_H
#define BINARYRAINWIDGET_H

#include <QWidget>
#include <QVector>
#include <QTimer>

class BinaryRainWidget : public QWidget {
    Q_OBJECT

public:
    explicit BinaryRainWidget(QWidget *parent = nullptr);
    ~BinaryRainWidget() override;

protected:
    void paintEvent(QPaintEvent *event) override;
    void resizeEvent(QResizeEvent *event) override;

private slots:
    void updateRain();

private:
    struct RainDrop {
        int x, y;
        int length;
        QColor color;
        QString text;
    };

    QVector<RainDrop> rainDrops;
    QTimer *timer;
};

#endif // BINARYRAINWIDGET_H
